package co.com.inventarios.persistencia;

import java.util.List;

import co.com.inventarios.modelo.Mngmcnsn;
import co.com.inventarios.modelo.MngmcnsnId;

/**
 * Interface for MngmcnsnDAO.
 * 
 * @author MyEclipse Persistence Tools
 */

public interface IMngmcnsnDAO {
	/**
	 * Perform an initial save of a previously unsaved Mngmcnsn entity. All
	 * subsequent persist actions of this entity should use the #update()
	 * method. This operation must be performed within the a database
	 * transaction context for the entity's data to be permanently saved to the
	 * persistence store, i.e., database. This method uses the
	 * {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist}
	 * operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * IMngmcnsnDAO.save(entity);
	 * EntityManagerHelper.commit();
	 * </pre>
	 * 
	 * @param entity
	 *            Mngmcnsn entity to persist
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void save(Mngmcnsn entity);

	/**
	 * Delete a persistent Mngmcnsn entity. This operation must be performed
	 * within the a database transaction context for the entity's data to be
	 * permanently deleted from the persistence store, i.e., database. This
	 * method uses the
	 * {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
	 * operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * IMngmcnsnDAO.delete(entity);
	 * EntityManagerHelper.commit();
	 * entity = null;
	 * </pre>
	 * 
	 * @param entity
	 *            Mngmcnsn entity to delete
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void delete(Mngmcnsn entity);

	/**
	 * Persist a previously saved Mngmcnsn entity and return it or a copy of it
	 * to the sender. A copy of the Mngmcnsn entity parameter is returned when
	 * the JPA persistence mechanism has not previously been tracking the
	 * updated entity. This operation must be performed within the a database
	 * transaction context for the entity's data to be permanently saved to the
	 * persistence store, i.e., database. This method uses the
	 * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
	 * operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * entity = IMngmcnsnDAO.update(entity);
	 * EntityManagerHelper.commit();
	 * </pre>
	 * 
	 * @param entity
	 *            Mngmcnsn entity to update
	 * @returns Mngmcnsn the persisted Mngmcnsn entity instance, may not be the
	 *          same
	 * @throws RuntimeException
	 *             if the operation fails
	 */
	public Mngmcnsn update(Mngmcnsn entity);

	public Mngmcnsn findById(MngmcnsnId id);

	/**
	 * Find all Mngmcnsn entities with a specific property value.
	 * 
	 * @param propertyName
	 *            the name of the Mngmcnsn property to query
	 * @param value
	 *            the property value to match
	 * @return List<Mngmcnsn> found by query
	 */
	public List<Mngmcnsn> findByProperty(String propertyName, Object value);

	public List<Mngmcnsn> findByMsnestado(Object msnestado);

	public List<Mngmcnsn> findByMsnvalor1(Object msnvalor1);

	/**
	 * Find all Mngmcnsn entities.
	 * 
	 * @return List<Mngmcnsn> all Mngmcnsn entities
	 */
	public List<Mngmcnsn> findAll();
}